package com.fantasizegame.project.gen.entity;

import java.util.List;

import com.fantasizegame.project.gen.utils.StringUtils;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class TableEntity {

	private String				tableName;
	private List<ColumnEntity>	columns;

	public String getClassName(boolean prefix) {
		if (prefix) {
			String tableName = this.tableName.substring(this.tableName.indexOf("_") + 1);
			return StringUtils.lineToHump(tableName.substring(0, 1).toUpperCase() + tableName.substring(1));
		}
		return StringUtils.lineToHump(tableName.substring(0, 1).toUpperCase() + tableName.substring(1));
	}

}
